The present invention relates to computer graphics, and more particularly to antialiasing in a computer graphics processing pipeline.
Images to be drawn on a raster-scan display, having a two dimensional array of pixel locations, must first be quantized to discrete memory locations, such as within a frame buffer, which correspond to the pixel locations of the array. This process limits the resolution of such displays to the physical characteristics of the array (i.e., 1024.times.1280 pixel locations) and often produces visual artifacts of the images when a human viewer""s ability to resolve the displayed image exceeds the limited resolution of the display on which the image is drawn.
This effect is referred to as xe2x80x9caliasingxe2x80x9d because visual artifacts are created by differences in the spatial frequency characteristics of the display and the spatial frequency characteristics of the viewer""s eyes. A familiar example of such an artifact is the jagged appearance of an image, such as a straight line or primitive edge, that results when the image is not aligned along a horizontal or vertical line of pixel locations. Prior Art FIG. 1 illustrates two versions of a line: one perfect line and one heavily aliased.
Techniques for removing or reducing artifacts by smoothing the appearance of the displayed image and/or increasing the spatial frequency characteristics of the display are known as xe2x80x9cantialiasingxe2x80x9d techniques.
Super-sampling is an antialiasing technique that increases the spatial quantization of the display""s array by increasing the number of data samples that are taken at or around each pixel location corresponding to a portion of the image to be displayed, and then combining the resulting values of these multiple data samples to obtain a final display value for each pixel location. In prior art systems, each super-sample typically includes both a color-value (for either color or gray-scale systems) and a Z-value (a representation of the depth of a pixel which is used to perform hidden surface removal) relating to a reference point (one reference point per super-sample) within the pixel.
Another well known technique includes multi-sampling. Unlike super-sampling, multi-sampling uses the color-values from the original sample for all sub-samples, and relies on the sub-samples positions to achieve its effect. The number of samples per pixel may vary from application to application.
While super-sampling exhibits output of a higher quality, it offers no speed advantages over multi-sampling. On the other hand, multi-sampling exhibits less quality and higher speed.
There is thus a need for achieving a compromise between quality and speed when antialiasing.
A system, method, and computer program product are provided for antialiasing during rendering in a graphics pipeline. Initially, a primitive of vertex data is received in a graphics pipeline. Next, a super-sampling operation is performed on the primitive of vertex data utilizing the graphics pipeline. Further, a multi-sampling operation is performed on the primitive of vertex data utilizing the graphics pipeline.
These and other advantages of the present invention will become apparent upon reading the following detailed description and studying the various figures of the drawings.